package com.auxgroup.smarthome.enterprise.bean;

import com.auxgroup.smarthome.enterpriseapi.responsebody.ProductBean;
import com.auxgroup.smarthome.basebean.ConnectionType;

import java.util.List;

/**
 * Created by kevinchen on 2017/3/2.
 */
public class PruductInfo {

    private String productKey;

    private String productSecret;

    private String productName;

    private String productType;

    private ConnectionType connectionType;

    private int createdAt;

    private int updatedAt;

    private String remark;

    private List<AppInfo> appInfos;

    public String getProductKey() {
        return productKey;
    }

    public void setProductKey(String productKey) {
        this.productKey = productKey;
    }

    public String getProductSecret() {
        return productSecret;
    }

    public void setProductSecret(String productSecret) {
        this.productSecret = productSecret;
    }

    public String getProductName() {
        return productName;
    }

    public void setProductName(String productName) {
        this.productName = productName;
    }

    public String getProductType() {
        return productType;
    }

    public void setProductType(String productType) {
        this.productType = productType;
    }

    public void setConnectionType(ConnectionType connectionType) {
        this.connectionType = connectionType;
    }

    public int getCreatedAt() {
        return createdAt;
    }

    public void setCreatedAt(int createdAt) {
        this.createdAt = createdAt;
    }

    public int getUpdatedAt() {
        return updatedAt;
    }

    public void setUpdatedAt(int updatedAt) {
        this.updatedAt = updatedAt;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public List<AppInfo> getAppInfos() {
        return appInfos;
    }

    public void setAppInfos(List<AppInfo> appInfos) {
        this.appInfos = appInfos;
    }

    public ConnectionType getConnectionType() {
        return connectionType;
    }

    public PruductInfo(ProductBean productBean) {
        this.productKey = productBean.getProduct_key();
        this.productName = productBean.getName();
        this.productSecret = productBean.getProduct_secret();
        this.productType = productBean.getProduct_key();
        this.connectionType = ConnectionType.valueOf(productBean.getConnection());
        this.createdAt = productBean.getCreated_at();
        this.updatedAt = productBean.getUpdated_at();
        this.remark = productBean.getRemark();
    }

    public PruductInfo() {
    }
}
